About new features of QuintaDB API
In this article, you will learn about the new features of the QuintaDB API.
Below are the latest updates.
Our service offers a unique opportunity - getting up to 15,000 records with just one API request! This feature will greatly expand the potential of your business application.
You can find out more and see the instructions by this link.
New query to update multiple records at once. This query will help you streamline your workflow and save a lot of api requests.
To use it, it is enough to pass the parameters dtype_ids, or json_dtype_ids (if it is necessary to pass parameters in JSON format) with the id of the records to update.
Request Body:
{rest_api_key: "API_KEY",
confirm_action: "update",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
json_dtype_ids: "[\"ID1\",\"ID2\"...]",
update_id: "UPDATE_ID",
update_term: "UPDATE_TERM"}
URL
/dtypes/confirm_action/APP_ID/ENTITY_ID.json
Where:
update_id - column id to update.
update_term - the new value of the column.
Important: use the confirm_action: "update" parameter.
Method Used - POST
Now you have the ability to update all records with a single request. Likewise with updating multiple records.
Request and URL example:
Request Body:
{rest_api_key: "YOUR_KEY",
confirm_action: "update_all",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
update_id: "UPDATE_ID",
update_term: "UPDATE_TERM"}
URL
/dtypes/confirm_action/APP_ID/ENTITY_ID.json
Where:
update_id - column id to update.
update_term - the new value of the column.
Important: use the parameter - confirm_action: "update_all".
Method Used - POST
Similar to updating multiple records, you can delete multiple records at once with just one query.
Parameters are used to execute the request: dtype_ids or json_dtype_ids.
Request and URL example:
Request Body:
{rest_api_key: "YOUR_KEY",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
json_dtype_ids: "[\"ID1\",\"ID2\"...]"}
URL
/apps/APP_ID/dtypes/delete_multiple.json
Method Used - POST
To delete all records, there is no need for additional parameters. You just need to pass the correct url and request body with your api key and form id.
Request and URL example:
Request body:
{rest_api_key: "YOUR_KEY",
entity_id: "ENTITY_ID"}
URL:
/dtypes/APP_ID/delete_all/ENTITY_ID.json
Where:
APP_ID - database id.
ENTITY_ID - form id.
Method Used - DELETE
Now, using API requests, you can start the task execution from the Action field. For example, start an e-mail newsletter or update a record.
To launch an action, you need to substitute the id of your field (Action) in the URL and pass the record id in the request body.
Request and URL example:
Request Body:
{"rest_api_key":"API_KEY",
"dtype_id": "DTYPE_ID"}
URL
/actions/ACTION_PROPERTY_ID.json
Where:
DTYPE_ID - entry id. You can get it by Fetch all records request.
ACTION_PROPERTY_ID - field id ("Action" field). You can get PROPERTY_ID by Fetch all form fields request.
Method Used - GET
You can also run multiple actions on your table at once. Similar to updating and deleting multiple records, use the parameters: dtype_ids, or json_dtype_ids.
Request and URL example:
Request body:
{"rest_api_key":"API_KEY",
"dtype_ids": ["ID1","ID2"...]}
URL:
/actions/ACTION_PROPERTY_ID.json
To run all actions in a table or report at once, use the parameter - run_by_all_table_or_report: true.
Request Body:
{"rest_api_key":"API_KEY",
"run_by_all_table_or_report": true}
Where:
ACTION_PROPERTY_ID - field identifier (Action). You can get PROPERTY_ID by Fetch all database forms request.
Method Used - GET